<script setup>
    import { useRoute } from 'vue-router';
    import {ref,onUpdated} from 'vue'

    let route = useRoute()

    let languageId = ref(0)
    let languageName = ref("")
    languageId.value = route.params.id
    languageName.value = route.params.language


    onUpdated(() => {
        languageId.value = route.params.id
        languageName.value = route.params.language
    })

</script>

<template>
  <div>
    <h1>接收到路由参数</h1>
    {{ languageId }}{{ languageName }}是世界上最好的语言

  </div>
 
</template>

<style scoped>
</style>
